package com.ptszyxx.popose.common.utils;


import com.ptszyxx.popose.common.enums.EditEnum;
import com.ptszyxx.popose.common.enums.HomeTabEnum;
import com.ptszyxx.popose.common.event.ExchangeDiamondEvent;
import com.ptszyxx.popose.common.event.HomeTabEvent;
import com.ptszyxx.popose.common.event.HomeTabFinishEvent;
import com.ysg.event.LogoutEvent;
import com.ptszyxx.popose.common.event.ChatClearMessageEvent;
import com.ptszyxx.popose.common.event.ChatMessageEvent;
import com.ptszyxx.popose.common.event.CommentSuccessEvent;
import com.ptszyxx.popose.common.event.DynamicDeleteEvent;
import com.ptszyxx.popose.common.event.DynamicStatusEvent;
import com.ptszyxx.popose.common.event.LabelEvent;
import com.ptszyxx.popose.common.event.ReplySuccessEvent;
import com.ptszyxx.popose.common.event.EditEvent;
import com.ptszyxx.popose.common.event.ShopEvent;
import com.ptszyxx.popose.common.event.TicketCloseEvent;
import com.ptszyxx.popose.common.event.UserEditEvent;
import com.ptszyxx.popose.common.event.VipEvent;
import com.ysg.bus.RxBus;

public class YBusUtil {

    public static void setDynamicStatus(String status){
        DynamicStatusEvent event = new DynamicStatusEvent(status);
        RxBus.getDefault().post(event);
    }

    /**
     * 回复成功
     */
    public static void sendReplySuccess(){
        RxBus.getDefault().post(new ReplySuccessEvent());
    }

    /**
     * 评论成功
     */
    public static void sendCommentSuccess(){
        RxBus.getDefault().post(new CommentSuccessEvent());
    }
    /**
     * 删除动态成功
     */
    public static void dynamicDeleteSuccess(){
        RxBus.getDefault().post(new DynamicDeleteEvent());
    }
    /**
     * 加载聊天会话
     */
    public static void loadChatMessage(){
        RxBus.getDefault().post(new ChatMessageEvent());
    }
    /**
     * 清空聊天
     */
    public static void chatClearMessage(){
        RxBus.getDefault().post(new ChatClearMessageEvent());
    }

    /**
     * 用户名称
     */
    public static void edit(String content, EditEnum editEnum){
        RxBus.getDefault().post(new EditEvent(content, editEnum));
    }

    /**
     * 用户标签
     */
    public static void label(String names){
        RxBus.getDefault().post(new LabelEvent(names));
    }

    /**
     * 商城-头像
     */
    public static void shop(String url, String type){
        RxBus.getDefault().post(new ShopEvent(url, type));
    }
    /**
     * 用户修改
     */
    public static void userEdit(){
        RxBus.getDefault().post(new UserEditEvent());
    }
    /**
     * vip充值
     */
    public static void vip(){
        RxBus.getDefault().post(new VipEvent());
    }
    /**
     * 金币兑换钻石
     */
    public static void exchangeSuccess(){
        RxBus.getDefault().post(new ExchangeDiamondEvent());
    }
    /**
     * 关闭门票
     */
    public static void ticketClose(){
        RxBus.getDefault().post(new TicketCloseEvent());
    }

    /**
     * 首页
     */
    public static void refreshHomeTab(boolean refresh, HomeTabEnum tabEnum){
        RxBus.getDefault().post(new HomeTabEvent(refresh, tabEnum));
    }
    /**
     * 首页
     */
    public static void refreshHomeTabFinish(boolean isLoadMore, HomeTabEnum tabEnum){
        RxBus.getDefault().post(new HomeTabFinishEvent(isLoadMore, tabEnum));
    }


}
